﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KMS.Core.domain.model.alert;
using System.Collections.ObjectModel;
using KMS.Core.domain.model.project;
using KMS.Core.domain.model.post;
using KMS.Core.domain.model.user;

namespace KMS.Core.application.impl
{
    public class SimpleNewsService : INewsService
    {
        #region INewsService Members

        public IList<Alert> FindNewsForCurrentUser()
        {
            return new List<Alert> { 
                new SystemAlert("Application created. Wellcome!", DateTime.Now.AddDays(-1), new Project("Test project")),
                new SystemAlert("Short event", DateTime.Now.AddDays(-10), new Project("Test project")),
                new PostAlert(new Resource(new User("Dennis"), "How to connect to Oracle", "In this tutorial we examine how to connect to Oracle database. It's not as easy as it may seem at the first sight!", new Project("My project"), DateTime.Now.AddDays(-7)), DateTime.Now.AddDays(-6), new Project("My project")),
                new SystemAlert("Long-long-long event. Warning! It takes time to read! It's too long because it's a super project. It won't fit any imaginable table column", DateTime.Now.AddDays(-5),new Project("Super project"))
            };
        }

        #endregion
    }
}
